package br.com.async.core.infrastructure;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ApplicationContextRegisterCore {

	private static ApplicationContext applicationContext;

	static {
		applicationContext = new ClassPathXmlApplicationContext(
				"application-context-core.xml");
	}

	public static <T> T getBean(String beanName, Class<T> type) {
		return (T) applicationContext.getBean(beanName, type);

	}

	public static void main(String[] args) {
		System.out.println(applicationContext);
	}
}
